//
//  UILabel+Extension.swift
//  新浪微博
//
//  Created by mac on 15/11/30.
//  Copyright © 2015年 mac. All rights reserved.
//

import UIKit

extension UILabel{
    convenience init(labeltext: String,color: UIColor,fontsize: CGFloat,margin: CGFloat = 0){
        self.init()
        text = labeltext
        textColor = color
        font = UIFont.systemFontOfSize(fontsize)
        textAlignment = NSTextAlignment.Left
        numberOfLines = 0
        if margin > 0 {
        preferredMaxLayoutWidth = screenW - 2 * margin
        }
        sizeToFit()
    }

}
